package com.juzipi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.juzipi.inter.mapper.RoleMapper;
import com.juzipi.inter.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/4/13 7:01
 * @Info 角色service
 */

@Service
public class RoleService {


    @Autowired
    private RoleMapper roleMapper;


    /**
     * 根据用户id查询roleList
     * @param roleId
     * @return
     */
    public List<Role> queryRoleListByUserRoleId(Long roleId) {

        return roleMapper.selectList(new QueryWrapper<Role>().lambda().eq(Role::getId, roleId));

    }
}
